package Demo4;

public class Animal {
    public String name;
    public Animal(String name){
        this.name=name;
    }

}
class Duck extends Animal implements IRunning,ISwimming{
    public Duck(String name){
        super(name);
    }
    public void run(){
        System.out.println("鸭子在跑");
    }
    public void swim(){
        System.out.println("鸭子在游泳");
    }
}
